package com.xnew.role.mapper;

import com.xnew.role.bean.AuRole;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface AuRoleMapper {
    int deleteByPrimaryKey(String arId) throws Exception;

    int insert(AuRole record) throws Exception;

    List<AuRole> selectAll(@Param("params") Map<String, Object> params) throws Exception;

    List<AuRole> selectRoleByAuth(@Param("params") Map<String, Object> params) throws Exception;

    int updateByPrimaryKey(AuRole record) throws Exception;

	List<Map<String,Object>> queryRoleUserList(@Param("params") Map<String, Object> map) throws Exception;

	List<Map<String,Object>> querySysUserList(@Param("params") Map<String, Object> map) throws Exception;

	List<Map<String,Object>> queryRoleListByUser(@Param("params") Map<String, Object> map) throws Exception;

	List<Map<String,Object>> queryAllRoleListByUser(@Param("params") Map<String, Object> map) throws Exception;

	String findRoleByRoleId(String roleId);

	void saveRoleUser(@Param("aurId") String aurId, @Param("arId") String arId, @Param("auId") String auId, @Param("aurCreateUser") String aurCreateUser);

	void deleteSysRoleUserByid(@Param("arId") String arId, @Param("auIds") List<String> auId);

	void deleteSysRolesByUserid(@Param("auId") String auId);

    List<AuRole> querySysRoleList(@Param("params") Map param);

	AuRole selectByPrimaryKey(@Param("arId") String arId);

	void deleteSysRoleByid(String arId);
}